﻿/********************************************************************************
** @ Date:2024/08/02
** @ Author: WeiXiaoYu
** @ Description: 公共数据类
** @ Version:1.0.0
** @ Fun:
********************************************************************************/
#ifndef CPUBLICDATAEX_H
#define CPUBLICDATAEX_H
#include "cdatabaseopermgr.h"

const QString g_sTableName = "CAR_ENTRY_RECORD-MONTHLY_PLAN-DAY_PLAN-UNLOAD_COAL_CHANNEL_ALLOT-VENDOR_INFO-RLRECORDMSTQY_NOTICE-RLRECORDMSTQY";

extern int messageBox(int nMsgLevel,QString sMsg);//全局QMessage，返回选择的结果 0信息框 1警告框 2错误框 3询问框

class CPublicDataEx
{
public:
    static CPublicDataEx& instance()
    {
        static CPublicDataEx instance;
        return instance;
    }
    bool initSql();//初始化数据库

public:
    CDatabaseOperMgr m_cDataBaseOperMgr;    //数据库操作对象
    QString m_sLedIp;//Led的IP地址
    int m_nLedPicRefSec;//Led图片刷新秒数


private:
    CPublicDataEx();
    ~CPublicDataEx();

    int m_nDbType;//数据库类型(0:MySql 1:Oracle 2:SqlServer)
    QString m_sConnectInfo;//数据库连接信息
    bool getIniConfigData();//获取ini配置文件信息

};

#endif // CPUBLICDATAEX_H
